<?php

// Error reporting.
error_reporting( E_ALL | E_STRICT );
ini_set( 'display_errors', 'on' );


// Modify include path to include path to library.
ini_set( 'include_path', ini_get( 'include_path' ) . PATH_SEPARATOR . 'application/Library' );


// Autoload classes.   
function __autoload ( $strClassName ) {

    $arr = explode( "_", $strClassName, 2 );
   
    switch ( $arr[0] ) {
      
        case "Core":
            require_once "Core/Loader.php";
            Core_Loader::loadClass( $strClassName );
            break;

        case "Models":
            require_once Core_Directories::MODELS . substr( $strClassName, 7 );
            break;

        default:
            require_once $strClassName . '.php';

    }
      
}   


// Get the front controller instance.
$FrontController = Core_Controllers_Front::getInstance();


// Process the request.
$FrontController->process();

?>